package com.hck.dao;

import com.hck.entity.T_sys_user;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface T_sys_userMapper {

    /**
     * 查询所有
     * @return
     */
    public List<T_sys_user> findAll();

    /**
     * 根据id查询
     * @param id
     * @return
     */
    public T_sys_user findById(int id);

    /**
     * 新增
     * @param tsysuser
     * @return
     */
    public int add(T_sys_user tsysuser);

    /**
     * 修改
     * @param tsysuser
     * @return
     */
    public int update(T_sys_user tsysuser);

    /**
     * 删除
     * @param id
     * @return
     */
    public int delete(Integer id);

    //示例二，三，四
    public List<T_sys_user> getUserListByPojo(T_sys_user tsysuser);

    //示例一
    public List<T_sys_user> getUsersByRealName(String realName);

    //示例五,六，七
    public List<T_sys_user> getUserListByMap(Map<String,Object> userMap);

    //示例八，九，十
    public List<T_sys_user> getUserListByParams(@Param("realName") String realName, @Param("roleId") int roleId);

    //示例十一，十二
    public List<T_sys_user> getUserListWithRoleName(T_sys_user tsysuser);

}
